package com.lst.api.vo;

import com.lst.api.entity.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author: Frank
 * @date: 2019/12/31 14:07
 * @version: V1.0
 */
@Data
@NoArgsConstructor
public class IsInputCodeAndNameVo extends CodeAndNameVo {

    @ApiModelProperty(name = "isInput", value = "是否需要输入    0:不需要    1:需要", required = true, dataType = "String")
    protected String isInput;

    public IsInputCodeAndNameVo(CompanyType companyType) {
        this(companyType.getId().toString(), companyType.getTitle(), companyType.getIsInput());
    }

    public IsInputCodeAndNameVo(IndustryType industryType) {
        this(industryType.getId().toString(), industryType.getTitle(), industryType.getIsInput());
    }

    public IsInputCodeAndNameVo(LoanBank loanBank) {
        this(loanBank.getId().toString(), loanBank.getTitle(), loanBank.getIsInput());
    }

    public IsInputCodeAndNameVo(LoanPurpose loanPurpose) {
        this(loanPurpose.getId().toString(), loanPurpose.getTitle(), loanPurpose.getIsInput());
    }

    public IsInputCodeAndNameVo(Overdue overdue) {
        this(overdue.getId().toString(), overdue.getTitle(), overdue.getIsInput());
    }

    public IsInputCodeAndNameVo(ResideType resideType) {
        this(resideType.getId().toString(), resideType.getTitle(), resideType.getIsInput());
    }

    public IsInputCodeAndNameVo(String code, String name, String isInput) {
        this.code = code;
        this.name = name;
        this.isInput = isInput;
    }
}
